package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Li_DaChiZi
 * Date: 2025/7/4
 * Time: 11:18
 */
public class Demo11 {
    public static void main(String[] args) {
        try (InputStream inputStream = new FileInputStream("./test.txt");) {
            byte[] buffer = new byte[1024];
            int n = inputStream.read(buffer);
            for (int i = 0; i < n; i++) {
                System.out.printf("0x%x\n",buffer[i]);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
